﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FDEE.Model
{

    public class MCIRebarRecord : RebarBase
    {
        //public int Radius, r, h, n, Lx, A, B, C, D ,h;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="mBarMark">钢筋主编号，例如1</param>
        /// <param name="sBarMark">钢筋次编号，例如1.1，默认为0</param>
        /// <param name="cBarMark">钢筋字符编号，例如1a，默认为空</param>
        /// <param name="diameter">钢筋直径，按eDB选取</param>   
        /// <param name="Ria"></param>
        /// <param name="lx"></param>
        /// <param name="quantity"></param>
        /// <param name="shapeConfg"></param>
        public MCIRebarRecord(int mBarMark, int sBarMark, string cBarMark, eDB diameter,
           int Ria,   int lx,
            int quantity, eShapeType shapeConfig):base(mBarMark,sBarMark,cBarMark,diameter,quantity,shapeConfig)
        {
            
            //this.r = RebarKnowledge.GerRadius(diameter);
            this.d = PublicEnumItems.GeteDBData(diameter.ToString());
            this.R = Ria;
            Lx = lx;

            Formula = "L=2πR+Lx";
            

        }

        public override void SetLength()
        {
            Length =Math.Round((2*Math.PI*R+Lx) * 0.001, 3, MidpointRounding.AwayFromZero) ;
        }
    }
}
